package com.fzj.example.socket;

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;

/**
 * ClassName: SocketDemo
 * date: 2019/11/15 14:30
 * Description: TODO
 *
 * @author fanzj@bonree.com
 * @since JDK 1.8
 */
public class SocketDemo {
    public static void main(String[] args) {
        Socket socket=null;
        try {
            SocketAddress socketAdress=new InetSocketAddress("192.168.0.23",122);
            //一分钟超时
            socket.connect(socketAdress,60000);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
